<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>微调</title>
<link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath}/jquery-easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath}/jquery-easyui/themes/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
<input id="spinner" value="0">
<script type="text/javascript">
var num;
$(document).ready(function () {
  $("#spinner").spinner({
    required: true,
    //是否可以直接输入值到字段
    editable: false,
    spin: function (down) {
      num = parseInt($(this).spinner("getValue"));
    },
    //spinner没有默认实现，须由用户定义onSpinUp和onSpinDown事件的回调函数
    onSpinUp: function () {
      $(this).spinner("setValue", num + 1);
    },
    onSpinDown: function () {
      $(this).spinner("setValue", num - 1);
    }
  });
});
</script>
</body>
</html>